import request from '@/utils/request'

// 查询订单信息列表
export function saleList(query) {
    return request({
      url: '/sale/order/list',
      method: 'get',
      params: query
    })
}
// 订单发货
export function deliverGoods(data) {
  return request({
    url: '/sale/order/deliver',
    method: 'put',
    data
  })
}

// 新建订单
export function fondOrder(data) {
  return request({
    url: '/sale/order/add',
    method: 'post',
    data
  })
}

//申请发货时间
export function editOrder(data) {
  return request({
    url: '/sale/agency/add',
    method: 'post',
    data
  })
}

// 订单删除
export function delOrder(data) {
  return request({
    url: '/sale/order/edit',
    method: 'put',
    data
  })
}

// 订单详情
export function getOrderDetail(data) {
  return request({
    url: '/sale/ordersDetails/list',
    method: 'get',
    params : data
  })
}

// 查看报表
export function getOrderStatistics(data) {
  return request({
    url: '/sale/ordersDetails/statistics',
    method: 'get',
    params : data
  })
}

// 订单安装
export function getOrderInstall(data) {
  return request({
    url: '/sale/order/install',
    method: 'post',
     data
  })
}

// 收款
export function getOrderCollection(data) {
  return request({
    url: 'sale/order/collection',
    method: 'post',
     data
  })
}


